Skip to content

feat(oracledb): add Oracle Database integration - #7378

Open
BillLeoutsakosvl346 wants to merge 5 commits into
stagingfrom
feat/oracledb-integration
Open

feat(oracledb): add Oracle Database integration#7378
BillLeoutsakosvl346 wants to merge 5 commits into
stagingfrom
feat/oracledb-integration

Conversation

@BillLeoutsakosvl346

@BillLeoutsakosvl346 BillLeoutsakosvl346 commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a direct Oracle Database integration under the oracledb namespace with six operations: Query, Execute, Insert, Update, Delete, and Introspect.

The connector uses exact oracledb@7.0.1 in Thin mode inside a request-scoped Node 24 child process. Credentials and optional PEM wallet data travel over private stdin only. TCP and verified TCPS are supported with service-name or SID descriptors.

Security and packaging highlights:

  • request-scoped loopback CONNECT proxy with validateDatabaseHost() on every initial and redirected target, numeric-IP pinning, TCPS hostname/SNI preservation, bounded tunnels, and cleanup
  • exact driver patch that preserves the trusted proxy across redirects, permits controlled TCP tunneling, and rejects TCP/TCPS protocol changes
  • source-hash, version, Thin-mode, Node 24, redirect, and proxy-precedence self-tests
  • complete patched driver and worker copied into Docker and Trigger.dev artifacts
  • 10,000-row / 10 MiB output limits, one-row driver fetching, LOB streaming, NUMBER-as-string normalization, and bounded process-global worker admission

Documentation includes connection setup, wallet usage, Oracle semantics and limits, eight templates, and suggested skills.

An official Oracle Free 23.26.3.0-lite ARM64 image was used for live TCP smoke testing. TCPS, PEM-wallet/mTLS, listener redirects, and older supported Oracle releases remain deferred.

Fixes #()

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Other

Testing

Passed locally:

  • Oracle suite: 12 files, 114 focused tests; final validator pass included password/masking coverage for 13 files and 124 tests
  • official Oracle Free live smoke through the real internal handler: service name (FREEPDB1), SID (FREE / CDB$ROOT), all six tools, MERGE, cross-request autocommit, NUMBER/RAW/date normalization, and set-based introspection
  • exact clean Docker runner build, including patched-driver verification and worker self-test inside the final non-root image
  • full monorepo suite: 19 tasks; 39,603 tests passed and 67 skipped
  • full typecheck and lint: 26 tasks each
  • all 45 repository audits
  • docs manifest/freshness, tool metadata, integration catalog, deployment config, frozen Bun install, and diff checks
  • host production build: 1,086 pages
  • final report-only integration validation after merging current staging: no critical, warning, or suggestion findings

The live harness encountered Oracle's documented ORA-01466 old-snapshot edge once when querying immediately after synthetic DDL; a fresh read-only operation passed. The integration retains SET TRANSACTION READ ONLY; no retry or security weakening was added for this test-only timing edge.

Reviewer focus:

  • CONNECT proxy and patched redirect trust boundary
  • worker lifecycle, bounded admission, and secret-safe protocol
  • Docker and Trigger.dev artifact layout
  • SQL classification and Oracle result normalization

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Screenshots/Videos

Not applicable.

@BillLeoutsakosvl346
BillLeoutsakosvl346 requested a review from a team as a code owner September 2, 2026 01:10
@vercel

vercel Bot commented Sep 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Sep 2, 2026 2:34am UTC

Request Review

@greptile-apps

greptile-apps Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds an Oracle Database integration with query, mutation, execution, and schema-introspection operations.

  • Introduces validated Oracle connection schemas, SQL construction and classification, bounded result normalization, and an isolated Node 24 worker.
  • Routes initial connections and listener redirects through a request-scoped validating CONNECT proxy.
  • Registers the block and tools across runtime, generated metadata, documentation, deployment configuration, and icon catalogs.
  • Packages and verifies the pinned, patched oracledb@7.0.1 driver in Docker and Trigger.dev environments.

Confidence Score: 5/5

The PR appears safe to merge based on the reviewed implementation and its coordinated runtime packaging.

No concrete changed-code failure remained after tracing SQL execution, connection and redirect validation, worker lifecycle, secret transport, result bounds, and deployment artifact resolution.

Important Files Changed

Filename Overview
apps/sim/lib/internal/oracledb/connect-proxy.ts Adds a request-scoped CONNECT proxy that validates and pins every initial or redirected Oracle target while bounding tunnel use.
apps/sim/lib/internal/oracledb/client.ts Adds bounded worker admission, cancellation, timeout handling, proxy lifecycle management, and child-process protocol execution.
apps/sim/lib/internal/oracledb/oracle-worker.cjs Implements Thin-mode connection setup, runtime patch verification, statement execution, LOB streaming, normalization, limits, and secret-safe error projection.
apps/sim/lib/internal/oracledb/query.ts Adds Oracle-aware SQL scanning, operation validation, identifier quoting, structured DML generation, and WHERE-expression safeguards.
apps/sim/lib/internal/oracledb/introspection.ts Adds bounded dictionary-view introspection for visible schemas, tables, columns, constraints, and indexes.
apps/sim/lib/internal/oracledb/schema.ts Defines strict bounded contracts for connection settings, credentials, wallet data, SQL, binds, and structured operations.
patches/oracledb@7.0.1.patch Extends the pinned driver to preserve proxy trust across redirects, support controlled TCP tunneling, and reject transport changes.
docker/app.Dockerfile Packages Node 24, the complete patched Oracle driver, worker, and verification scripts into the production image.
apps/sim/trigger.config.ts Selects Node 24 and includes the worker, verification scripts, driver package, and package metadata in Trigger.dev artifacts.
apps/sim/blocks/blocks/oracledb.ts Defines the Oracle workflow block, six operations, protected connection fields, operation-specific inputs and outputs, templates, and skills.

Sequence Diagram

sequenceDiagram
  participant C as Workflow or Agent
  participant T as Oracle Tool
  participant P as CONNECT Proxy
  participant W as Node 24 Worker
  participant O as Oracle Database
  C->>T: Invoke query, execute, mutation, or introspection
  T->>P: Start request-scoped loopback proxy
  T->>W: Send credentials and statements over stdin
  W->>P: CONNECT initial Oracle target
  P->>P: Resolve, validate, and pin target IP
  P->>O: Open TCP or TCPS tunnel
  opt Listener redirect
    W->>P: CONNECT redirected target
    P->>P: Revalidate and pin redirected IP
    P->>O: Open replacement tunnel
  end
  W->>O: Execute bounded statement batch
  O-->>W: Rows or affected count
  W-->>T: Bounded normalized JSON
  T-->>C: Structured tool result
  T->>P: Close proxy and tunnels
Loading

Reviews (1): Last reviewed commit: "feat(oracledb): add Oracle Database inte..." | Re-trigger Greptile

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 56 files

Heads up: you’re close to your included review allowance. Set a flex budget so reviews don’t pause.

Re-trigger cubic

Comment thread apps/docs/components/icons.tsx Outdated
Comment thread apps/sim/package.json
Comment thread packages/deployment-config/src/integrations.json
Comment thread apps/sim/lib/internal/oracledb/query.ts
Comment thread apps/sim/tools/oracledb/types.ts Outdated
Comment thread apps/sim/components/icons.tsx Outdated
Bill Leoutsakos added 2 commits September 1, 2026 18:42
@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@cubic-dev-ai review this PR again after commit 7c247da. The six prior threads have been addressed and resolved; please perform a fresh review of the updated diff.

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR again after commit 7c247da. The six prior threads have been addressed and resolved; please perform a fresh review of the updated diff.

@BillLeoutsakosvl346 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 58 files

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

Comment thread apps/sim/lib/internal/oracledb/query.ts
@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@cubic-dev-ai please review this PR again after b28b751. The prior constant-only Oracle WHERE finding is fixed, independently validated, and its thread is resolved.

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai please review this PR again after b28b751. The prior constant-only Oracle WHERE finding is fixed, independently validated, and its thread is resolved.

@BillLeoutsakosvl346 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 58 files

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

Comment thread apps/sim/lib/internal/oracledb/query.ts
@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@cubic-dev-ai please review this PR again at b28b751. The latest function-tautology thread was reproduced, answered with repository-contract and cross-database evidence, and resolved as intentionally out of scope; please perform a fresh review and account for that rationale.

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai please review this PR again at b28b751. The latest function-tautology thread was reproduced, answered with repository-contract and cross-database evidence, and resolved as intentionally out of scope; please perform a fresh review and account for that rationale.

@BillLeoutsakosvl346 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 58 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant